package com.dnjn.happiness.biz.api;

import com.dnjn.happiness.biz.api.factory.RemoteAdviceFallbackFactory;
import com.dnjn.happiness.biz.api.factory.RemoteAppraiseFallbackFactory;
import com.dnjn.happiness.common.core.constant.SecurityConstants;
import com.dnjn.happiness.common.core.constant.ServiceNameConstants;
import com.dnjn.happiness.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteAdviceService", value = ServiceNameConstants.BIZ_SERVICE, fallbackFactory = RemoteAdviceFallbackFactory.class)
public interface RemoteAdviceService {

    @GetMapping("/admin/advice/modelUp/{userId}/{time}")
    public R<Double> modelUp(@PathVariable("userId") Long userId,@PathVariable("time")  String time, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);


    @GetMapping("/admin/advice/modelOper/{userId}/{time}")
    public R<Double> modelOper(@PathVariable("userId") Long userId,@PathVariable("time")  String time, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
